#include <iostream>
#include<string>
using std::cout;
using std::endl;
class Base{
public:
	virtual void print() {
		cout << "Base::print()" << endl;
		}
	virtual void display() {
		cout << "Base::display()" << endl;
	}
	virtual void show() {
		cout << "Base::show()" << endl;
	}
private:
	long _base = 10;
};

class Derived
: public Base
{
public:
	virtual void print() {
		cout << "Derived::print()" << endl;
	}
	virtual void display() {
		cout << "Derived::display()" << endl;
	}
	virtual void show() {
		cout << "Derived::show()" << endl;
	}
    virtual void x(){
        cout<<"x"<<endl;
    }
private:
	long _derived = 100;
};
int main(){
    Base be;
    cout<<sizeof(be)<<endl;
    Derived de;
    cout<<sizeof(de)<<endl;
   long* pv=(long*) &be;
   cout<<pv[1]<<endl;
   long *ppv =(long*)pv[0]; 
 typedef void(*f)();
 void(*fff)() =(f) ppv[0];  
 f f1=(f)ppv[0];
f1();fff();
    return 0;
}
